home *** CD-ROM | disk | FTP | other *** search
- Help on !Mole
- /***************************************************************************\
- * *
- * !Mole, *
- * *
- * 3D Molecular modeller, *
- * *
- * version 2.00 (28-Sep-92), *
- * *
- * © Simon Kilvington, 1992 *
- * *
- \***************************************************************************/
-
-
- Mole is a program to edit and display molecular models, these may then be
- saved as Sprite or Draw files, or rendered to give a more realistic 3D image
- which can then be saved as a sprite.
-
- Main menu options
- =================
-
- 'Save'
- leads to a submenu which allows the saving of the current molecule as a
- Mole, Sprite or Draw file. Each of these options leads to a normal 'Save as'
- dialogue box.
- Note: Draw files are not clipped to the size of the main Mole window, so
- if a molecule is not fully visible when the window is at full size, parts of
- it will lie outside the background rectangle in the resulting Draw file.
-
- 'File'
- leads to a dialogue box giving information about the current molecule.
-
- 'Display type'
- leads to a dialogue box that allows the molecule to be shown in several
- different styles, monochrome skeletal, skeletal, 'ball and stick', space
- filling or as a Van der Waals surface. The dispersion of points over the VDW
- surface can be specified, large values give less points but will be faster
- to draw, the dispersion is actually the arc length (in pm) between adjacent
- points. It also allows Hydrogen atoms to be not shown, and the atoms to be
- drawn in a way that gives a more 3D feal to the image.
- Note: at present, this 'pseudo-rendered' way of displaying molecules and
- the VDW surface can not be exported to Draw files.
-
- 'Colours'
- leads to a submenu that allows the background and bond colour (of mono
- skeletal and 'ball and stick' models) to be altered.
-
- 'Render'
- leads to the Render submenu, this will be discussed later.
-
- 'Show Mover'
- selecting this opens the Mover window, this allows the molecule to be
- rotated and translated to your hearts content.
-
- 'Show Editor'
- selecting this opens the Editor. See below.
-
-
- Mover
- =====
-
- Clicking on the arrow icons in the Mover window will change the position
- and orientation of the molecule, the angle and position steps used when the
- arrow icons are clicked can be altered in the Mover menu. To get the
- molecule redrawn in the main window click on the 'Update' icon, or it can be
- redrawn automatically when the orientation or position are changed by
- selecting 'Continuous update' from the Mover menu.
- 'Return to origin' on the Mover menu returns the molecule to its origin
- ie translation is 0,0,0 and the rotation about each axis is also 0.
- This rotation is about the molecules internal axis, not the screen axis.
- To rotate the molecule about the screen axis, select the amount to rotate
- about each axis by in the 'Screen axis' part of the Mover window, then click
- on update. As before, if continuous update is selected the molecule will be
- automatically redrawn when you click on one of the Screen axis arrows.
- To undo the rotation about the screen axis either rotate the molecule in
- the opposite direction about each axis (you will also have to do the
- rotations in the reverse order, ie if you did X +45°, then Y +10°, then Z
- -30°, you would have to do Z +30°, then Y -10°, and finaly X -45° to restore
- the molecule to its original orientation), or select 'Reset screen axis'
- from the Mover menu.
- Note: the translation of the molecule is the last step that is performed
- before it is drawn, so any rotations will not effect its position. Also, the
- molecule will be redrawn a lot quicker if it has not been rotated about the
- screen axis at all.
-
-
- Editor
- ======
-
- On opening the Editor the edit cursor will appear in the main window,
- this shows the current atom (or fragment) to join to the molecule as a blue
- outline. The cursor shows where it will be attatched to the molecule. This
- atom or fragment can be rotated about the bond it is going to be joined to
- using the 'Rotation' icons, and when it is in the correct position it can
- be joined by clicking on the large 'Join' icon.
- Clicking on any atom in the main window will cause it to become the
- selected atom, this will be shown by highlighting the atom in the main
- window with a blue outline and diagramatically in the Editor window, in the
- 'Selected atom' icon. The diagram shows what the atom is bonded to and which
- of its bonds are free to connect things to. Clicking on one of the bonds in
- the diagram will cause it to be the selected bond, this is the bond to which
- new atoms or fragments will be joined (if the bond is not already
- connected).
- Aswell as rotating the atom or fragment to join the 'Rotation' icons can
- be used to rotate selected parts of the molecule. If the selected bond is
- already connected then the edit cursor will just highlight the atom to which
- the bond is attatched. This atom (and the atoms connected to it) can then be
- rotated about the selected bond using the 'Rotation' icons.
-
- Editor menu
- ===========
-
- 'Name'
- this allows the molecule name to be changed.
-
- 'Rescale'
- clicking on this option causes the molecule to be rescaled by the program
- so that the molecule picture neatly fits into the main window (well, that's
- the theory anyway - it works most of the time), alternatively a new scale
- can be entered in the submenu.
-
- 'Recentre'
- this translates the molecule so that the mean atom coordinates are zero.
-
- 'Atoms'
- this leads to a submenu that allows the atom type to join to be selected,
- the atom types to be edited, or the atom types to be saved.
- When editing an existing atom type or entering a new one the caret is
- placed in the first text icon that needs to be filled in, pressing return
- will move it to the next and cause 'OK' to be selected after the last entry.
- The colour of the atom type can be changed by dragging the sliders (as in
- the Palette utility). The 'OK' icon must be clicked on to cause the changes
- to be registered with the program.
-
- 'Fragments'
- this leads to a submenu that allows the fragment to join to be selected,
- the fragments to be edited, or the fragments to be saved.
- The only aspects of fragments that can be edited from here are the name,
- and where on the fragment it will be joined to the molecule. To choose which
- atom to join the fragment via, select it on the picture of the fragment, the
- bond to join via is selected from the atom diagram in the top right of the
- fragment editor window. Again 'OK' must be clicked to register the changes.
-
- 'Change atom'
- this allows the currently selected atom to be replaced by another atom
- type.
-
- 'Move atom'
- this allows the currently selected atom to be moved to a new position.
-
- 'Close ring'
- selecting this will cause the currently selected bond to be joined to an
- atom which it is touching. This has no effect if the bond is not touching
- another atom.
-
- 'Break bond'
- breaks the selected bond.
-
- 'Delete atom'
- deletes the currently selected atom.
-
- 'Add Hydrogens'
- adds Hydrogen atoms to all empty bonds in the molecule.
-
- 'Wipe molecule'
- asks for confirmation if the molecule is unsaved, and then wipes it.
-
-
- Rendering
- =========
-
- The molecule is rendered onto the screen as follows. The observer views
- the molecule along a line parallel to the +ve Z axis. 'xres' by 'yres' rays
- of light are considered, these leave the observer and pass through an
- imaginary grid at the focal distance in front of the observer. The grid is
- of size 'aspect' by 1.0, divided into 'xres' by 'yres' holes evenly
- distributed across it. The colour of the object at the bottom left hand
- corner of each hole is rendered onto the screen. This colour depends on the
- ambient light intensity and the intensity of the light reaching it from each
- lamp. Light from individual lamps may be blocked by other objects in the
- scene and this leads to shadows in the final image.
- The spread of a lamp is the angle over which its intensity is not zero.
- The intensity within this range has a maximum along a line joining the
- position and the target and falls off linearly with the angle away from this
- line. A spread of zero means that the lamp has equal intensity in all
- directions.
- Each lamps position and target coordinates are independant of the aspect
- ratio, they are expressed in terms of fractions of the distance across the
- imaginary grid. The observers coordinates are 0.5,0.5,-1.0, again these are
- independant of the aspect ratio. This means that position and target
- coordinates of 0,0,0 will be in the bottom left hand corner of the scene,
- whereas coordinates of 1,1,0 will be in the top right hand corner, and +ve Z
- coordinates are in the scene whereas Z coordinates of less than -1.0 are
- behind the observer.
-
- Rendering menu
- ==============
-
- 'Resolution'
- a standard set of resolutions are available, or a user definable one can
- be selected. All resolutions are expressed in terms of X pixels by Y pixels.
-
- 'Aspect'
- this allows the aspect ratio (X/Y) of the image to be changed.
-
- 'Focal'
- a focal length of 1.0 will cause the rendered molecule to be the same
- size as the molecule pictured in the main window. Increasing the focal
- length will give a telephoto effect, whereas decreasing it will lead to a
- wide angle view.
-
- 'Lamps'
- this allows you to add extra lamps to illuminate the molecule, or to
- alter existing ones.
- Lamp details can not be saved, although they can be set in the config
- file so that the program starts up with your prefered lamps each time. See
- inside the directory 'Docs' in the !Mole application for details of the
- config file.
-
- 'Ambient'
- this sets the ambient light level, ie the intensity of the light falling
- on every object irrespective of the lamps.
-
- 'Brightness'
- this sets the overall brightness, too large a value will cause the
- picture to be over exposed (ie too bright, so everything comes out white),
- too small a value will cause the picture to be too dark.
-
- 'Shadows'
- if selected shadows are cast in the rendered image, if not, they won't be.
-
- 'Multi task'
- if selected you can still use the computer when it is rendering, a
- dialogue box is opened to show how its going, and to allow you to pause or
- quit the rendering. If not selected the hourglass will be displayed while
- the rendering proceeds, this shows the percentage complete.
-
- 'Render'
- select this to start rendering when the above has all been set up to your
- desired values. (The rendering may take a few minutes!)
-
- 'Stats'
- this shows a dialogue box with a list of statistics about the last image
- rendered. The time taken, brightest red, green or blue component of an image
- pixel etc.
-
-
- Loading and saving
- ==================
-
- Mole files dragged onto the main window, or the Mole icon, are loaded as
- new molecules, and any existing molecule data is overwritten.
- Mole files dragged onto the Editor will be loaded as fragments. If a
- fragment of the same name already exists it is overwritten with the new
- data, otherwise the new fragment is added to the end of the fragment list.
- Double clicking on a Mole file will cause it to be loaded as a new
- molecule unless a molecule is already being edited, in which case it is
- loaded as a fragment.
- When a new Atoms file is loaded atom types in the file with the same name
- as existing atom types replace the previous data, atom types with new names
- are added to the end of the atom types list.
- When a Mole file is loaded as a fragment the bond and atom to join it via
- are set to the atom and bond that where selected when it was saved.
- Note: fragments can be saved from the Editor into the main window to be
- edited, and molecules in the main window can be saved into the Editor as
- fragments.
-
-
- History
- =======
-
- v0.00 - 0.41 (7-Feb-91)
-
- Crap, unfinished, Basic program that only allowed you to design planar
- molecules because I suddenly realised I knew nothing about vectors.
-
-
- v2.00 (28-Sep-92)
-
- Finally got around to updating the above.
-
-
- v2.01 (25-Oct-92)
-
- The following keyboard short cuts have been added...
-
- cursor up/down : rotate the molecule about its X axis
- cursor left/right : rotate the molecule about its Y axis
- F1/F2 : rotate the molecule about its Z axis
-
- shift + left/right : translate the molecule along the X axis
- shift + up/down : translate the molecule along the Y axis
- shift + F1/F2 : translate the molecule along the Z axis
-
- ctrl + up/down : rotate about the screens X axis
- ctrl + left/right : rotate about the screens Y axis
- ctrl + F1/F2 : rotate about the screens Z axis
-
-
- v2.02 (8-Nov-92)
-
- A couple of minor bugs have been fixed. It is now not possible to join
- atoms or fragments to a bond that is already occupied (!), and atoms with
- coordinates that are too large for the plotting routines are now clipped off
- rather than being plotted in unexpected places.
-
-
- v2.03 (14-Jan-93)
-
- A couple of other bugs have been fixed. In the rendering of cylinders the
- surface normals are now always calculated correctly, the colours used in the
- main window now never get out of sync with the current mode, and it is now
- possible to use Mole in hi-res modes.
-
-
- v2.04 (14-Feb-93)
-
- An option has been added to the display types menu to allow the Van der
- Waals surface of a molecule to be displayed, empty bonds can now be filled
- up with Hydrogen atoms and bonds can be broken using options in the editor
- menu.
- A bug that caused the program to bomb out with no warning after viewing
- too many dialogue boxes after doing some rendering has been fixed.
- The rendering algorithm has been altered, the output is unchanged but the
- routine now predicts which objects will be visible where, and so need only
- concentrate on rendering rather than trying to calculate what can be seen at
- each point. This at least doubles the speed of the rendering process, and
- will give even better performance increases with larger numbers of objects
- and higher resolutions. Shadows also need not be calculated, this also at
- least doubles the speed.
- Unfortunately I haven't sorted out all the maths for predicting where
- cylinders will appear yet, so these are still rendered at the same speed as
- before. Although there is a sphere at the end of each cylinder when they are
- used to model bonds, so skeletal pictures will still be rendered faster than
- before.
- It's a bit disheartening when you use something like MidasPlus on an IRIS
- and it renders a 1000 atom protein, at a resolution of 1280 × 1024 pixels,
- in about half a minute! The trouble with Mole's renderer is that it's all
- floating point maths at the moment, so it'll never be particularly fast
- until either you get a maths co-processor, or I convert it to fixed point.
- By the way, if you have RISC OS 3.1 then the Shared C Library and the FP
- Emulator modules are in ROM, using RMFaster to move them into RAM gives an
- increase in rendering speed of about 10%.
-
-
- v2.05 (17-May-93)
-
- A minor change of order in the scaling/perspective routines allows much
- larger molecules to be displayed. This also showed up the fact that the Draw
- file transfering bug is still here for large files.
- More optimization in the renderer, I've finally added the maths to
- predict where cylinders will appear, this gives enormous speed increases, I
- was using mono-skeletal Serotonin (25 atoms) to test the routine and the
- time taken to render it, at low resolution, was reduced from just over 3
- minutes to about 35 seconds (on an ARM3).
- Also, precalculation of which objects can not possibly cast shadows on
- each other knocks about a third off the rendering speed. Again, at the
- moment, this only applies to spheres, cylinders may look nice but they are a
- right pain when it comes to trying to predict where they are.
- The bug that caused the program to bomb out after rendering was still
- there for ball and stick models, this has now been fixed once and for all.
-
-
- Known problems
- ==============
-
- Mole sometimes has difficulty doing RAM transfers of large Draw files to
- my version of Draw (0.44), this seems to be due to Draw giving up receiving
- data after one or two buffer fills (though the need for more than one buffer
- fill is brought on by Mole's fairly inaccurate estimate of the length of
- large Draw files). The solution (if the problem occurs) is to save the Draw
- file to disc first, and then load it into Draw from there.
- I've got RISC OS 3.1 now and the problem still occurs with the new
- version of Draw (0.88), but only for much larger molecules.
-
- If a Mole file is dragged onto the Mole icon or into the main Mole window
- it will overwrite any existing molecule that is being edited, without any
- warning, even if the original molecule has not been saved.
-
-
- Use and copying of this program
- ===============================
-
- Mole is a 'Freeware' program, ie you can freely use and copy it as long
- as all of the following files are copied (unaltered) with it:
-
- !Mole.!Boot
- !Help.!ReadMe
- !Run
- !RunImage
- HelpText (this file)
- !Run
- !RunImage
- !Sprites
- AtomTypes.
- Docs.Config
- FileTypes
- Fragments.
- Sprites
- Templates
-
- Obviously, files may be added/deleted/altered to/from/in the 'AtomTypes'
- and 'Fragments' libraries, and the 'Config' file may be altered, to best
- suit your needs.
-
-
- Credits
- =======
-
- The coordinates for the C60 'Bucky Ball' (actually the vertices of a
- truncated icosahedron) came from an excellent desktop polyhedra drawing
- program called 'WimpPoly' by K.M. Crennell, via the 'Fortran Friends'
- ShareWare library. (Much as I oppose the use of Fortran!).
-
-
- Postamble
- =========
-
- For more information, about file formats etc, see files inside the 'Docs'
- directory in the !Mole application.
-
-
- Any comments, suggestions, bugs or donations can be sent to:
-
- Simon Kilvington,
- 46 Mead Road,
- Portishead,
- Bristol,
- BS20 8NY.
-
- or EMAIL to 'srk@uk.ac.southampton', although I will not be there around
- Christmas and Easter, during August, or after about 1995 (when my PhD will
- be finished, hopefully!).
-
- Donations will ensure you recieve copies of updates and related programs
- if/as they are written. Projects currently planned/under development include
- a program to convert SMILES strings to Mole files, and a molecular dynamics
- simulation that will produce movies of molecules flexing, it will also be
- able to minimise structures along the trajectory so giving the preferred
- conformations of Mole files, using Fourier transforms it should also be
- possible to extract bond vibration frequencies.
- I have no idea when these will be finished as I don't have much time for
- programming at the moment (except my PhD stuff), but I see no fundamental
- reason why they should not get done eventually.
-
- Right, that's that done, I'm off for a smoke.
- Student life, eh, it's all go!
-
-